import Vue from "vue";
import moment from "moment";
import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'
import router from "../router";
import axios from 'axios'
Vue.prototype.$axios = axios;
Vue.prototype.$log = window.console.log;
//全局时间格式化过滤
Vue.filter('moment', function (value, formatString) {
    formatString = formatString || 'YYYY-MM-DD HH:mm:ss';
    return moment(value).format(formatString);
});
//Vconsole
// import Vconsole from 'vconsole'
// let vConsole = new Vconsole()
// Vue.use(vConsole)
//Element
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
//有赞
import Vant from 'vant';
import 'vant/lib/index.css';
Vue.use(Vant);
//点击图片放大
Vue.use(Viewer);
Viewer.setDefaults({
    Options: { "inline": true, "button": true, "navbar": true, "title": true, "toolbar": true, "tooltip": true, "movable": true, "zoomable": true, "rotatable": true, "scalable": true, "transition": true, "fullscreen": true, "keyboard": true, "url": "data-source" }
});
//URL全局跳转
Vue.prototype.jump_url = url => {
    return router.push(url)
};